//
//  JMOrderInfoCell.m
//  NewiOSProject
//
//  Created by JMMac on 15.1.24.
//  Copyright © 2024 范智渊. All rights reserved.
//

#import "JMOrderInfoCell.h"

@interface JMOrderInfoCell ()

@end
@implementation JMOrderInfoCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.selectionStyle = 0;
        
        _nameLab = [JMControl createLabelWithFrame:(CGRectMake(24, 0, kAppW()-48, 52)) Font:Font(14) Text:@"" color:Text_COLOR_LEVEL2()];
        [self.contentView addSubview:_nameLab];
        
        _valueLab = [JMControl createLabelWithFrame:(CGRectMake(24, 0, kAppW()-48, 52)) Font:mediumFont(14) Text:@"" color:Hex_Str_COLOR(@"#555555")];
        [self.contentView addSubview:_valueLab];
        _valueLab.textAlignment = 2;
    }
    return self;
}
-(instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        _nameLab = [JMControl createLabelWithFrame:(CGRectMake(24, 0, kAppW()-48, 52)) Font:Font(14) Text:@"" color:Text_COLOR_LEVEL2()];
        [self.contentView addSubview:_nameLab];
        
        _valueLab = [JMControl createLabelWithFrame:(CGRectMake(24, 0, kAppW()-48, 52)) Font:mediumFont(14) Text:@"" color:Hex_Str_COLOR(@"#555555")];
        [self.contentView addSubview:_valueLab];
        _valueLab.textAlignment = 2;
    }
    return self;
}
-(void)setModel:(NSDictionary *)model{
    _model = model;
    _nameLab.text = [model stringValueForKey:@"key" default:@""];
    _valueLab.text = [model stringValueForKey:@"value" default:@""];
}
@end
